<ng-container body-head>
  <div class="profile-body">
    <div class="title" style="margin-bottom: 1rem;padding:5px 15px;">
      <span>平台配置</span>
      <!-- <span>内网仓库</span> -->
      <div>

        <button *ngIf="!isEditing" class="btn btn-primary" (click)="isEditing=true">
          编辑
        </button>
        <div *ngIf="isEditing"  class="ng-star-inserted">
          <button data-hacker
          (click)="handleCancelbtnClick()"
               class="btn btn-secondary mr-3">取消</button>
              <button data-hacker 
              (click)="saveSecurtySetting()"
              class="btn btn-primary abcdefghi">保存</button>
      </div>


        <!-- <button *ngIf="repoForm.untouched" class="btn btn-sm btn-outline-dark" (click)="sync()">
          立即同步
        </button>
        <ng-container *ngIf="repoForm.touched">
          <button mat-icon-button form="form">
            <mat-icon>check_circle</mat-icon>
          </button>
          <button mat-icon-button>
            <mat-icon>highlight_off</mat-icon>
          </button>
        </ng-container> -->
      </div>
    </div>
    <button style="width:100px;" _ngcontent-krk-c36="" class="btn ml-3 ng-star-inserted btn-primary"
                routerlinkactive="btn-primary" tabindex="0"> 安全配置 </button>
    <form id="form" [formGroup]="repoForm" (ngSubmit)="submit()">
      <!-- <div class="row">
        <div class="col-2">内网商店接口地址：</div>
        <div class="column">
          <input
            class="form-control w35"
            formControlName="DeepinAppStoreUrl"
          />
        </div>
      </div>
      <div class="row">
        <div class="col-2">内网商店应用仓库地址：</div>
        <m-iptable-edit class="w35" formControlName="DeepinAppStoreSourceList"></m-iptable-edit>
      </div>
      <div class="row">
        <div class="col-2">内网商店后台地址：</div>
        <input
            class="form-control w35"
            formControlName="DeepinAppStoreBackgroundUrl"
          />
      </div>
      <div class="row">
        <div class="col-2">静态资源地址：</div>
        <input
            class="form-control w35"
            formControlName="DeepinAppStoreIconUrl"
          />
      </div> -->
      <div class="row">
        <div class="col-2">cookie有效期：</div>
        <input
        *ngIf="!isEditing"
        disabled
        disabled class="form-control w35" 
        formControlName="cookie_max_valid_minutes"/>
        <input
        *ngIf="isEditing"
         class="form-control w35" 
        formControlName="cookie_max_valid_minutes"/>

        <span style="line-height: 43px;
        margin-left: 20px;">分钟</span>
        <div style="display: inline;padding-top:11px;
        " _ngcontent-max-c37="" class="ml-3 ng-star-inserted"><i _ngcontent-max-c37=""
 class="material-icons" title="管理员通过浏览器访问控制台时，生成的cookie最长有效期，失效后需要重新登录；可输入1-44640之间的正整数">error_outline</i>
</div>

          <!-- [ngClass]="{'m-menu__item--active' : isMenuItemIsActive(item)}" -->

          <div *ngIf="repoForm.get('cookie_max_valid_minutes').hasError('isInvalid')"

                        
                         class="invalidd-feedback">
                                请输入1-44640之间的正整数</div>

          <!-- <div class="cross-validation-error-message alert alert-danger">
            Name cannot match alter ego.
        </div> -->
      </div>
      <div class="row">
        <div class="col-2">页面最长静止时间：</div>
        <input
        *ngIf="!isEditing"
        disabled
            class="form-control w35"
            formControlName="page_max_quiet_minutes"
          />
          <input
          *ngIf="isEditing"
              class="form-control w35"
              formControlName="page_max_quiet_minutes"
            />
            <span style="line-height: 43px;
    margin-left: 20px;">分钟</span>
    <div style="display: inline;padding-top:11px;
    " _ngcontent-max-c37="" class="ml-3 ng-star-inserted"><i _ngcontent-max-c37=""
class="material-icons" title="管理员登录控制台后,超过一定时长(最长静止时间)未操作页面，再次操作时需要重新登录;可输人1-1440之间的正整数。">error_outline</i>
</div>
          <div *ngIf="repoForm.get('page_max_quiet_minutes').hasError('isInvalid')"

                        
                         class="invalidd-feedback">
                                请输入1-1440之间的正整数</div>
      </div>
    </form>
  </div>
</ng-container>
